projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
570302d
)
Use logical instead of physical name for tunnel underlying link.
author
Steven Barth
<
[email protected]
>
Mon, 13 May 2013 09:12:10 +0000
(11:12 +0200)
committer
Steven Barth
<
[email protected]
>
Mon, 13 May 2013 09:12:10 +0000
(11:12 +0200)
Signed-off-by: Steven Barth <
[email protected]
>
system-linux.c
patch
|
blob
|
history
diff --git
a/system-linux.c
b/system-linux.c
index efda0d5e54a0ac924204e06584fadbd779f75120..f5c900db2185ff5b6e17cc5228bc3f04208f92aa 100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-1342,9
+1342,14
@@
int system_add_ip_tunnel(const char *name, struct blob_attr *attr)
return -EINVAL;
unsigned int link = 0;
- if ((cur = tb[TUNNEL_ATTR_LINK]) &&
- !(link = if_nametoindex((const char*)blobmsg_data(cur))))
- return -EINVAL;
+ if ((cur = tb[TUNNEL_ATTR_LINK])) {
+ struct interface *iface = vlist_find(&interfaces, blobmsg_data(cur), iface, node);
+ if (!iface)
+ return -EINVAL;
+
+ if (iface->l3_dev.dev)
+ link = iface->l3_dev.dev->ifindex;
+ }
if (!strcmp(str, "sit")) {